package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNews;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import com.heima.wemedia.entity.MaterialTypeEntity;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {

    public void saveBatchRelation(@Param("materialIds") List<Integer> materialIds,
                                  @Param("newsId") Integer newsId,
                                  @Param("type") Short type);

    void saveBatchRelation2(@Param("materials")List<MaterialTypeEntity> materialTypeEntities,
                           @Param("newsId") Integer newsId);
}